<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: Model Downloader</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__modelDownloader.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Model Downloader<div class="ingroups"><a class="el" href="group__deepVision.html">DNN Vision Library (jetson-inference)</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Utilities for automatically downloading pre-trained models.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga61fe6cb2e130091e0e33a81e8cca43d2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#ga61fe6cb2e130091e0e33a81e8cca43d2">JSON_STR</a>(x)&#160;&#160;&#160;(x.is_string() ? x.get&lt;std::string&gt;() : &quot;&quot;)</td></tr>
<tr class="memdesc:ga61fe6cb2e130091e0e33a81e8cca43d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper macro for getting a string from a JSON element.  <a href="group__modelDownloader.html#ga61fe6cb2e130091e0e33a81e8cca43d2">More...</a><br /></td></tr>
<tr class="separator:ga61fe6cb2e130091e0e33a81e8cca43d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade5ee56e8f8bf404fcd9dd17e98c54e2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#gade5ee56e8f8bf404fcd9dd17e98c54e2">JSON_STR_DEFAULT</a>(x,  default)&#160;&#160;&#160;(x.is_string() ? x.get&lt;std::string&gt;() : default)</td></tr>
<tr class="memdesc:gade5ee56e8f8bf404fcd9dd17e98c54e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper macro for getting a string from a JSON element.  <a href="group__modelDownloader.html#gade5ee56e8f8bf404fcd9dd17e98c54e2">More...</a><br /></td></tr>
<tr class="separator:gade5ee56e8f8bf404fcd9dd17e98c54e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga05129bb258eeaa3da77f2a1d9d6fd661"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#ga05129bb258eeaa3da77f2a1d9d6fd661">DownloadModel</a> (nlohmann::json &amp;model, uint32_t retries=2)</td></tr>
<tr class="memdesc:ga05129bb258eeaa3da77f2a1d9d6fd661"><td class="mdescLeft">&#160;</td><td class="mdescRight">Download a pre-trained model given its JSON config.  <a href="group__modelDownloader.html#ga05129bb258eeaa3da77f2a1d9d6fd661">More...</a><br /></td></tr>
<tr class="separator:ga05129bb258eeaa3da77f2a1d9d6fd661"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac9a7dd494959c16c291a39167a45a4c7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#gac9a7dd494959c16c291a39167a45a4c7">DownloadModel</a> (const char *type, const char *name, nlohmann::json &amp;model, uint32_t retries=2)</td></tr>
<tr class="memdesc:gac9a7dd494959c16c291a39167a45a4c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Download a pre-trained model and return its JSON config.  <a href="group__modelDownloader.html#gac9a7dd494959c16c291a39167a45a4c7">More...</a><br /></td></tr>
<tr class="separator:gac9a7dd494959c16c291a39167a45a4c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d09a61f26d37db40e8800caf243cbba"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#ga8d09a61f26d37db40e8800caf243cbba">FindModel</a> (const char *type, const char *name)</td></tr>
<tr class="memdesc:ga8d09a61f26d37db40e8800caf243cbba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a model can be found in the model manifest.  <a href="group__modelDownloader.html#ga8d09a61f26d37db40e8800caf243cbba">More...</a><br /></td></tr>
<tr class="separator:ga8d09a61f26d37db40e8800caf243cbba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad929f8b8a7b206dba59108663a8b277d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#gad929f8b8a7b206dba59108663a8b277d">FindModel</a> (const char *type, const char *name, nlohmann::json &amp;model)</td></tr>
<tr class="memdesc:gad929f8b8a7b206dba59108663a8b277d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a pre-trained model's config in the model manifest.  <a href="group__modelDownloader.html#gad929f8b8a7b206dba59108663a8b277d">More...</a><br /></td></tr>
<tr class="separator:gad929f8b8a7b206dba59108663a8b277d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55644d0724c16154e419831e4b9ae58f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#ga55644d0724c16154e419831e4b9ae58f">FindModel</a> (const char *type, const char *name, nlohmann::json &amp;models, nlohmann::json &amp;model)</td></tr>
<tr class="memdesc:ga55644d0724c16154e419831e4b9ae58f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a pre-trained model's config in the model manifest.  <a href="group__modelDownloader.html#ga55644d0724c16154e419831e4b9ae58f">More...</a><br /></td></tr>
<tr class="separator:ga55644d0724c16154e419831e4b9ae58f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa4476b06252ff64b260870d66eaa5019"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#gaa4476b06252ff64b260870d66eaa5019">LoadModelManifest</a> (const char *path=&quot;networks/models.json&quot;)</td></tr>
<tr class="memdesc:gaa4476b06252ff64b260870d66eaa5019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the model manifest from a JSON file.  <a href="group__modelDownloader.html#gaa4476b06252ff64b260870d66eaa5019">More...</a><br /></td></tr>
<tr class="separator:gaa4476b06252ff64b260870d66eaa5019"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab9d397a3fdcf7d218a76cf07548e522"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__modelDownloader.html#gaab9d397a3fdcf7d218a76cf07548e522">LoadModelManifest</a> (nlohmann::json &amp;models, const char *path=&quot;networks/models.json&quot;)</td></tr>
<tr class="memdesc:gaab9d397a3fdcf7d218a76cf07548e522"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the model manifest from a JSON file.  <a href="group__modelDownloader.html#gaab9d397a3fdcf7d218a76cf07548e522">More...</a><br /></td></tr>
<tr class="separator:gaab9d397a3fdcf7d218a76cf07548e522"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Utilities for automatically downloading pre-trained models. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga61fe6cb2e130091e0e33a81e8cca43d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga61fe6cb2e130091e0e33a81e8cca43d2">&#9670;&nbsp;</a></span>JSON_STR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define JSON_STR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x</td><td>)</td>
          <td>&#160;&#160;&#160;(x.is_string() ? x.get&lt;std::string&gt;() : &quot;&quot;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Helper macro for getting a string from a JSON element. </p>

</div>
</div>
<a id="gade5ee56e8f8bf404fcd9dd17e98c54e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gade5ee56e8f8bf404fcd9dd17e98c54e2">&#9670;&nbsp;</a></span>JSON_STR_DEFAULT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define JSON_STR_DEFAULT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">default&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(x.is_string() ? x.get&lt;std::string&gt;() : default)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Helper macro for getting a string from a JSON element. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gac9a7dd494959c16c291a39167a45a4c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9a7dd494959c16c291a39167a45a4c7">&#9670;&nbsp;</a></span>DownloadModel() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool DownloadModel </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>retries</em> = <code>2</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Download a pre-trained model and return its JSON config. </p>

</div>
</div>
<a id="ga05129bb258eeaa3da77f2a1d9d6fd661"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga05129bb258eeaa3da77f2a1d9d6fd661">&#9670;&nbsp;</a></span>DownloadModel() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool DownloadModel </td>
          <td>(</td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>retries</em> = <code>2</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Download a pre-trained model given its JSON config. </p>

</div>
</div>
<a id="ga8d09a61f26d37db40e8800caf243cbba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d09a61f26d37db40e8800caf243cbba">&#9670;&nbsp;</a></span>FindModel() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FindModel </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if a model can be found in the model manifest. </p>

</div>
</div>
<a id="gad929f8b8a7b206dba59108663a8b277d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad929f8b8a7b206dba59108663a8b277d">&#9670;&nbsp;</a></span>FindModel() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FindModel </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>model</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find a pre-trained model's config in the model manifest. </p>

</div>
</div>
<a id="ga55644d0724c16154e419831e4b9ae58f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55644d0724c16154e419831e4b9ae58f">&#9670;&nbsp;</a></span>FindModel() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FindModel </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>models</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>model</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Find a pre-trained model's config in the model manifest. </p>

</div>
</div>
<a id="gaa4476b06252ff64b260870d66eaa5019"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa4476b06252ff64b260870d66eaa5019">&#9670;&nbsp;</a></span>LoadModelManifest() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool LoadModelManifest </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em> = <code>&quot;networks/models.json&quot;</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load the model manifest from a JSON file. </p>

</div>
</div>
<a id="gaab9d397a3fdcf7d218a76cf07548e522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaab9d397a3fdcf7d218a76cf07548e522">&#9670;&nbsp;</a></span>LoadModelManifest() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool LoadModelManifest </td>
          <td>(</td>
          <td class="paramtype">nlohmann::json &amp;&#160;</td>
          <td class="paramname"><em>models</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em> = <code>&quot;networks/models.json&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Load the model manifest from a JSON file. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Mar 28 2023 14:27:58 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
